{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="x-ua-compatible" content="ie=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>{% block title %}{% endblock %}</title>
    <link rel="stylesheet" type="text/css" href="{% static 'css/bootstrap.min.css' %}">
    <link rel="stylesheet" type="text/css" href="{% static 'css/iconfont.css' %}">
    <link rel="stylesheet" type="text/css" href="{% static 'css/main.css' %}">
    <script type="text/javascript" src="{% static 'js/jquery.min.js' %}"></script>
    <script type="text/javascript" src="{% static 'js/jquery.cookie.js' %}"></script>
    <script type="text/javascript" src="{% static 'js/bootstrap.min.js' %}"></script>
    <script type="text/javascript" src="{% static 'js/utils.js' %}"></script>
    {% block extarnal_header %}{% endblock %}
</head>
<body>
    {% block body %}{% endblock %}
</body>
    {% block extranal_js %}{% endblock %}
    <script type="text/javascript">
        var csrftoken =$.cookie('csrftoken');
        function csrfSaFeMethod(method){
            return (/^(GET|HEAD|OPTION|TRACE)$/.test(method))
        }
        $.ajaxSetup({
            beforeSend:function (xhr,settings){
                if(!csrfSaFeMethod(settings.type) && !this.crossDomain){
                    xhr.setRequestHeader("X-CSRFToken",csrftoken);
                }
            }
        })
    </script>
</html>